﻿


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Freeform;


namespace Space_in_Shaders 
{
    public abstract class Explosion
    {
        public static void Create(SpaceWorld World, Vector2 Position, Vector2 Velocity, Int32 Smoke, Int32 Flame, Single Intensity)
        {
            for (Int32 i = 0; i < Flame; i++)
            {
                Vector2 RadialV = Util.Vec2InDir(World.Game.Random.Single(0, MathHelper.TwoPi)) * World.Game.Random.Single(Intensity / 4, Intensity);
                new Flame(World, Position, Velocity + RadialV, 5);
            }

            for (Int32 i = 0; i < Smoke; i++)
            {
                Vector2 RadialV = Util.Vec2InDir(World.Game.Random.Single(0, MathHelper.TwoPi)) * World.Game.Random.Single(Intensity / 2, Intensity);
                new SmokePuff(World, Position, Velocity + RadialV, 5);
            }
        }

    }
}